Generate google meet links in slack

工作流概述

这是一个包含9个节点的复杂工作流,主要用于自动化处理各种任务。

工作流源代码

下载
{
  "id": "O2R3U22TB968fWUo",
  "meta": {
    "instanceId": "cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7"
  },
  "name": "Generate google meet links in slack",
  "tags": [
    {
      "id": "GkyPPgldsTmLDY6O",
      "name": "createdBy:JC",
      "createdAt": "2024-02-29T21:51:58.448Z",
      "updatedAt": "2024-02-29T21:51:58.448Z"
    }
  ],
  "nodes": [
    {
      "id": "5577aaf6-f682-49c3-9d21-f819151f77c5",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        300,
        480
      ],
      "webhookId": "f442a7bb-451e-4371-8b7a-614caa0e04dd",
      "parameters": {
        "path": "slack-meet-trigger",
        "options": {},
        "httpMethod": "POST",
        "responseData": "noData",
        "responseMode": "lastNode"
      },
      "typeVersion": 1.1
    },
    {
      "id": "018c32c7-c3eb-4679-8064-ab92bb62cac5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        140,
        142
      ],
      "parameters": {
        "color": 6,
        "width": 463.09809221779403,
        "height": 482.56534054190786,
        "content": "### 1. Setup: Add a Slack App
**a.** Visit https://api.slack.com/apps, click on `New App` and choose a name and workspace.
**b.** Click on `OAuth & Permissions` and scroll down to Scopes -> Bot token Scopes
**c.** Add the `chat:write` scope & `chat:write.public`
**d.** Navigate to `Slash Commands` and click `Create New Command`
**e.** Use `/meet` as the command
**f.** Copy the production URL from the **Webhook** node into `Request URL` within your slash command
**g.** Add relevant description and usage hint
**h.** Go to `Install app` and click install
**i.** Don't worry about app distribution, that's only if you're trying to publish an app on the slack store"
      },
      "typeVersion": 1
    },
    {
      "id": "3bfa07d4-ef3e-4ec4-91a2-ca94e2346299",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        240
      ],
      "parameters": {
        "color": 6,
        "width": 291.779972644588,
        "height": 192.66150688057675,
        "content": "### 2. Setup: Google auth & calendar
**a.** Visit [the docs](https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/) and follow the steps to setup Google auth credential
**b.** Choose the calendar you wish to create google meet links from



👇"
      },
      "typeVersion": 1
    },
    {
      "id": "aab60499-7123-43c0-8f99-d0eade0f5672",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        238
      ],
      "parameters": {
        "color": 6,
        "width": 292.3392628968803,
        "height": 192.92455101677126,
        "content": "### 3. Setup: Configure slack node authentication and your message
**a.** Connect your slack account
**b.** Configure your message text. Be sure to include the hangoutLink expression to output a meeting link

👇"
      },
      "typeVersion": 1
    },
    {
      "id": "a15fc232-ec8e-4dfb-add7-2a3c27c5a232",
      "name": "Create event with google meet link",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        740,
        480
      ],
      "parameters": {
        "end": "={{ $now.plus({minutes: 15}) }}",
        "start": "={{ $now }}",
        "calendar": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "additionalFields": {
          "conferenceDataUi": {
            "conferenceDataValues": {
              "conferenceSolution": "hangoutsMeet"
            }
          }
        }
      },
      "typeVersion": 1
    },
    {
      "id": "57c2d5b8-f5d7-4db1-9e13-48265d174679",
      "name": "Send msg with Google meet link",
      "type": "n8n-nodes-base.slack",
      "position": [
        1060,
        480
      ],
      "parameters": {
        "text": "=Join me here: {{ $('Create event with google meet link').item.json.hangoutLink }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Webhook').item.json.body.channel_id }}"
        },
        "otherOptions": {
          "unfurl_links": false,
          "includeLinkToWorkflow": false
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "898b9681-c532-490e-aea2-a4f693b52f35",
      "name": "Delete temporary calendar event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1400,
        480
      ],
      "parameters": {
        "eventId": "={{ $('Create event with google meet link').item.json[\"id\"] }}",
        "options": {},
        "calendar": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "operation": "delete"
      },
      "typeVersion": 1
    },
    {
      "id": "ec70003a-6dea-4c1b-a16e-e64a206aba16",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        140,
        -20
      ],
      "parameters": {
        "color": 4,
        "width": 459.2991776576996,
        "height": 146.4269155371431,
        "content": "## Generate google meet links with a slack command 
Spin up instant google meet links directly from slack and send to all channel participants

"
      },
      "typeVersion": 1
    },
    {
      "id": "eee48232-8477-4bfb-8164-bfaf66062071",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        240
      ],
      "parameters": {
        "color": 6,
        "width": 292.3392628968803,
        "height": 192.92455101677126,
        "content": "### 3. Setup: Select google calendar account
**a.** Select the same calendar you're using to create the initial event




👇"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "09457e4b-ccba-497f-b046-3529edc7b332",
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Create event with google meet link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send msg with Google meet link": {
      "main": [
        [
          {
            "node": "Delete temporary calendar event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create event with google meet link": {
      "main": [
        [
          {
            "node": "Send msg with Google meet link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

功能特点

  • 自动检测新邮件
  • AI智能内容分析
  • 自定义分类规则
  • 批量处理能力
  • 详细的处理日志

技术分析

节点类型及作用

  • Webhook
  • Stickynote
  • Googlecalendar
  • Slack

复杂度评估

配置难度:
★★★★☆
维护难度:
★★☆☆☆
扩展性:
★★★★☆

实施指南

前置条件

  • 有效的Gmail账户
  • n8n平台访问权限
  • Google API凭证
  • AI分类服务订阅

配置步骤

  1. 在n8n中导入工作流JSON文件
  2. 配置Gmail节点的认证信息
  3. 设置AI分类器的API密钥
  4. 自定义分类规则和标签映射
  5. 测试工作流执行
  6. 配置定时触发器(可选)

关键参数

参数名称 默认值 说明
maxEmails 50 单次处理的最大邮件数量
confidenceThreshold 0.8 分类置信度阈值
autoLabel true 是否自动添加标签

最佳实践

优化建议

  • 定期更新AI分类模型以提高准确性
  • 根据邮件量调整处理批次大小
  • 设置合理的分类置信度阈值
  • 定期清理过期的分类规则

安全注意事项

  • 妥善保管API密钥和认证信息
  • 限制工作流的访问权限
  • 定期审查处理日志
  • 启用双因素认证保护Gmail账户

性能优化

  • 使用增量处理减少重复工作
  • 缓存频繁访问的数据
  • 并行处理多个邮件分类任务
  • 监控系统资源使用情况

故障排除

常见问题

邮件未被正确分类

检查AI分类器的置信度阈值设置,适当降低阈值或更新训练数据。

Gmail认证失败

确认Google API凭证有效且具有正确的权限范围,重新进行OAuth授权。

调试技巧

  • 启用详细日志记录查看每个步骤的执行情况
  • 使用测试邮件验证分类逻辑
  • 检查网络连接和API服务状态
  • 逐步执行工作流定位问题节点

错误处理

工作流包含以下错误处理机制:

  • 网络超时自动重试(最多3次)
  • API错误记录和告警
  • 处理失败邮件的隔离机制
  • 异常情况下的回滚操作